$ PL Program: Test Definitions
begin
	$$$$$
	$ Test Definitions
	$$$$$

	$ Const
	const Z = 10; 
	const Y = true;
	const X = Z;

	$ Integer Array
	integer array A[5];
	integer array B[true];
	integer array C[Z];
	integer array D,E[2];

	$ Boolean Array
	Boolean array F[5];
	Boolean array G[true];
	Boolean array H[Z];
	Boolean array I,J[2];

	$ Integer
	integer a; 
	integer b, c; 

	$ Boolean
	Boolean d; 
	Boolean e, f; 

	$ Procedure
	proc Foo
	begin
		proc Bar
		begin
			const A = 2;
			Boolean a;
			integer b;
		end;

		call Bar;
	end;

	proc Bar
	begin
	end;

	$$$$$
	$ Test Statements
	$$$$$

	$ Empty
	skip;

	$ Read
	read a;
	read c, d;

	$ Write
	write a;
	write c, d;

	$ Assignment
	a := 10;
	b,c := 1,2;
	A[1] := 4;
	A[(Z - 6)] := 8;

	d := true;
	e, f := true , false;
	F[1] := true;

	$ Procedure
	call Bar;
	call Foo;

	$ If
	if b = c -> a:=11; [] ~(b = c) -> a:=9; fi;

	$ Do
	do c = b -> a := 1; od;
	do (d = f) -> a:=a+1; [] ~(a = f) -> a:=a-1; od;

	$$$$$
	$ Test Operators
	$$$$$

	$ OR
	if (b = c | c = b) -> a:=11; [] ~(b = c) -> a:=9; fi;

	$ AND
	if (b = c & c = b) -> a:=11; [] ~(b = c) -> a:=9; fi;

	$ Less, greater and equals
	if (b < b) -> a:=11; []  (b = b) -> a:=9; [] (b > b) -> a:=4; fi;

	$ Math operations
	a := (-1 + 3 - 1) * 10 / 2 \ 4; $ = 1
	write a;

end.
